﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleBehaviorTreeLibrary
{
    internal class IsEnergyLow : Condition 
    {
        public override RunResult Run(Blackboard blackboard)
        {
            Console.WriteLine("Is energy low? Checking...");

            if (blackboard.EnergyIsLow)
            {
                Console.WriteLine("Energy is low.");

                return RunResult.Success;
            }

            Console.WriteLine("Energy reserve is OK.");

            return RunResult.Failure;
        }
    }
}
